Page({
  data: {
    //公共列表
    announcementList: []
  },
  onLoad() {
    this.getAnnouncement()
  },
  async getAnnouncement() {
    wx.utils.toast('显示成功')
    //测试网络请求
    const res = await wx.http({
      url: '/announcement',
    })
    console.log(res);
    //设置到Data中
    this.setData({
      announcementList: res.data
    })


  },
})
